import http from '@/http' 
import { CategoryModel, ListCategoryParam } from './CategoryModel'

//新增
export const addApi = (param:CategoryModel) => {
    return http.post("/api/category",param)
}

//列表
export const getListApi = (param:ListCategoryParam) => {
    return http.get("/api/category/list",param)
}

//下拉列表
export const getSelectApi = () => {
    return http.get("api/category/getSelectList")
}

//删除 ?
export const deleteApi = (categoryId:string) => {
    return http.delete(`/api/category/${categoryId}`)
}

//编辑 ?
export const editApi = (param:CategoryModel) => {
    return http.put("/api/category",param)
}